package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * SysUserRole generated by hbm2java
 */
@Entity
@Table(name="sys_user_role"
    ,catalog="lmis"
)
public class SysUserRole  implements java.io.Serializable {


     private Short roleNo;
     private String roleName;
     private String roleDescr;
     private Set<SysUserLogin> sysUserLogins = new HashSet<SysUserLogin>(0);
     private Set<SysApproveLevel> sysApproveLevels = new HashSet<SysApproveLevel>(0);
     private Set<SysUserLogin> sysUserLogins_1 = new HashSet<SysUserLogin>(0);

    public SysUserRole() {
    }

    public SysUserRole(String roleName, String roleDescr, Set<SysUserLogin> sysUserLogins, Set<SysApproveLevel> sysApproveLevels, Set<SysUserLogin> sysUserLogins_1) {
       this.roleName = roleName;
       this.roleDescr = roleDescr;
       this.sysUserLogins = sysUserLogins;
       this.sysApproveLevels = sysApproveLevels;
       this.sysUserLogins_1 = sysUserLogins_1;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="ROLE_NO", unique=true, nullable=false)
    public Short getRoleNo() {
        return this.roleNo;
    }
    
    public void setRoleNo(Short roleNo) {
        this.roleNo = roleNo;
    }

    
    @Column(name="ROLE_NAME", length=50)
    public String getRoleName() {
        return this.roleName;
    }
    
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    
    @Column(name="ROLE_DESCR", length=100)
    public String getRoleDescr() {
        return this.roleDescr;
    }
    
    public void setRoleDescr(String roleDescr) {
        this.roleDescr = roleDescr;
    }

@ManyToMany(fetch=FetchType.LAZY, mappedBy="sysUserRoles")
    public Set<SysUserLogin> getSysUserLogins() {
        return this.sysUserLogins;
    }
    
    public void setSysUserLogins(Set<SysUserLogin> sysUserLogins) {
        this.sysUserLogins = sysUserLogins;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sysUserRole")
    public Set<SysApproveLevel> getSysApproveLevels() {
        return this.sysApproveLevels;
    }
    
    public void setSysApproveLevels(Set<SysApproveLevel> sysApproveLevels) {
        this.sysApproveLevels = sysApproveLevels;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="sysUserRole")
    public Set<SysUserLogin> getSysUserLogins_1() {
        return this.sysUserLogins_1;
    }
    
    public void setSysUserLogins_1(Set<SysUserLogin> sysUserLogins_1) {
        this.sysUserLogins_1 = sysUserLogins_1;
    }




}


